package com.financial.service.heemoney.convertor;

import com.financial.service.heemoney.dto.HeemoneyConfigDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyProviderSubmitBusinessDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneySettleBusinessDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyWxPayConfigBusinessDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneyProviderSubmitCommonDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneySettleCommonDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneyWxPayConfigCommonDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyProviderSubmitInParamDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneySettleInParamDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyWxPayConfigInParamDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author: zhaopengjun
 * @Email dashuaizhao@aliyun.com
 * @Date: 2019/12/6 10:19
 * @Des 汇收银微信支付通道配置公共参数自动转javabean工具类
 */
@Mapper(componentModel = "spring")
public interface HeemoneyWxPayConfigConvert {
    HeemoneyWxPayConfigConvert MAPPER = Mappers.getMapper(HeemoneyWxPayConfigConvert.class);

    @Mapping(target = "method", source = "heemoneyConfigDTO.heemoneyWxPayConfig.method")
    @Mapping(target = "isv_mch_uid", source = "heemoneyConfigDTO.heemoneyAccountType.isv_mch_uid")
    @Mapping(target = "isv_app_id",source ="heemoneyConfigDTO.heemoneyAccountType.app_id")
    @Mapping(target = "key",source ="heemoneyConfigDTO.heemoneyAccountType.key")
    HeemoneyWxPayConfigCommonDTO configDTOConvertCommonDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyWxPayConfigInParamDTO heemoneyWxPayConfigInParamDTO);

    HeemoneyWxPayConfigBusinessDTO configDTOConvertBusinessDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyWxPayConfigInParamDTO heemoneyWxPayConfigInParamDTO);



}
